home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / system-config-printer / troubleshoot / RemoteAddress.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2009-10-28  |  2KB  |  45 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from base import *
  5.  
  6. class RemoteAddress(Question):
  7.     
  8.     def __init__(self, troubleshooter):
  9.         Question.__init__(self, troubleshooter, 'Remote address')
  10.         page = self.initial_vbox(_('Remote Address'), _('Please enter as many details as you can about the network address of this printer.'))
  11.         table = gtk.Table(2, 2)
  12.         table.set_row_spacings(6)
  13.         table.set_col_spacings(6)
  14.         page.pack_start(table, False, False, 0)
  15.         label = gtk.Label(_('Server name:'))
  16.         label.set_alignment(0, 0)
  17.         table.attach(label, 0, 1, 0, 1)
  18.         self.server_name = gtk.Entry()
  19.         self.server_name.set_activates_default(True)
  20.         table.attach(self.server_name, 1, 2, 0, 1)
  21.         label = gtk.Label(_('Server IP address:'))
  22.         label.set_alignment(0, 0)
  23.         table.attach(label, 0, 1, 1, 2)
  24.         self.server_ipaddr = gtk.Entry()
  25.         self.server_ipaddr.set_activates_default(True)
  26.         table.attach(self.server_ipaddr, 1, 2, 1, 2)
  27.         troubleshooter.new_page(page, self)
  28.  
  29.     
  30.     def display(self):
  31.         answers = self.troubleshooter.answers
  32.         if answers['cups_queue_listed']:
  33.             return False
  34.         return answers['printer_is_remote']
  35.  
  36.     
  37.     def collect_answer(self):
  38.         if not self.displayed:
  39.             return { }
  40.         return {
  41.             'remote_server_name': self.server_name.get_text(),
  42.             'remote_server_ip_address': self.server_ipaddr.get_text() }
  43.  
  44.  
  45.